var t = getApp();

Page({
    data: {
        orderId: null,
        goods: [],
        task: null
    },
    onLoad: function(t) {
        var o = this;
        t.order_id || (wx.showToast({
            title: "订单不存在",
            icon: "none"
        }), setTimeout(function() {
            wx.navigateBack();
        }, 1e3)), this.setData({
            orderId: t.order_id
        }), this.getOpenerEventChannel().on("recordDetails", function(t) {
            var e = t.data;
            o.setData({
                task: e
            });
        });
    },
    onReady: function() {
        this.getOrderDetails();
    },
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    getOrderDetails: function() {
        var o = this;
        wx.showLoading();
        var e = t.getNetAddresss("plugin.free-lottery.frontend.index.order-info");
        t._getNetWork({
            url: e,
            data: {
                order_id: this.data.orderId
            },
            success: function(t) {
                var e = t.data, n = e.data, a = e.result, i = e.msg;
                wx.hideLoading(), 0 !== a ? (o.setData({
                    goods: n
                }), wx.stopPullDownRefresh()) : wx.showToast({
                    title: i,
                    icon: "none"
                });
            },
            fail: function(t) {
                wx.hideLoading(), wx.showToast({
                    title: t.msg || t.message,
                    icon: "none"
                });
            }
        });
    }
});